package com.itbour.service.stats.impl;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.itbour.dao.stats.KeywordTmplCnt;
import com.itbour.dao.stats.SysInfoStatsDao;
import com.itbour.dto.stats.SysTotalStatisDto;
import com.itbour.dto.stats.SysUserInfo;
import com.itbour.dto.stats.UserDocInfoDto;
import com.itbour.service.stats.SysInfoStatsService;

public class SysInfoStatsServiceImpl implements SysInfoStatsService {

	private SysInfoStatsDao statsDao;
	
	
	//获取用户图表信息
	public List<SysUserInfo> getUserChartInfo(Map<String, Object> parm) {
		return statsDao.getUserGrowthInfo(parm);
	}


	//获取总的数量
	public List<SysTotalStatisDto> getTotalStaList(Map<String, Object> parm) {
		List<SysTotalStatisDto> list = new ArrayList<SysTotalStatisDto>();
		list=statsDao.getDocTotaList(parm);
		Long sumU = (long) statsDao.getSumUserCnt(parm);
		Long tnum = (long) statsDao.getTdyIncUserCnt(parm);
		for (SysTotalStatisDto sysTotalStatisDto : list) {
			sysTotalStatisDto.setSumU(sumU);
			sysTotalStatisDto.setTnum(tnum);
		}
		return list;
	}

	//获取文档图表信息
	public List<UserDocInfoDto> getUserDocCnt(Map<String, Object> parm) {
		return statsDao.getUserDocInfo(parm);
	}

	
	
	public SysInfoStatsDao getStatsDao() {
		return statsDao;
	}
	public void setStatsDao(SysInfoStatsDao statsDao) {
		this.statsDao = statsDao;
	}


	public List<KeywordTmplCnt> getKeywordTmplCnt(Map<String, Object> parm) {
		return statsDao.getKeywordTmplCnt(parm);
	}


	/** 一键秀 关键词下模板统计
	 */
	public List<KeywordTmplCnt> getYjxKeywordTmplCnt(Map<String, Object> parm) {
		return statsDao.getYjxKeywordTmplCnt(parm);
	}
}
